package cc.comac.saic.hkhy.jsrj.gj.inttools.parser;

import java.util.HashMap;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shisongyan
 * @date 2025/11/18
 */
@Getter
@Setter
public class ParseResult {
    private String source;
    private Map<String, Object> extractedData;
    private boolean success;
    private String errorMessage;

    public ParseResult(String source) {
        this.source = source;
        this.extractedData = new HashMap<>();
        this.success = true;
    }

    public void addField(String key, Object value) {
        this.extractedData.put(key, value);
    }

    public Object getField(String key) {
        return this.extractedData.get(key);
    }
}
